<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>

</head>
<body>
    <div align="center" class="info">${repeat}</div>
    <h2>${userSession.userName}</h2>
    <input type="button" onclick=location.href="/jsp/login.jsp" value="返回上一级"/>
    <form name="form1" id="form1" method="post" action="${pageContext.request.contextPath }/User/register">
        用户名:<input type="text" name="name" id="name" placeholder="请输入用户名"><br/>
        密码:<input type="password" name="pwd1" id="pwd1" placeholder="请输入密码"><br/>
        请再次输入密码:<input type="password" name="pwd2" id="pwd2" placeholder="请再次输入密码"><br/>
        <input type="button" onclick="f()" value="注册"/>
        <script>
            function f(){
                var form = document.getElementById("form1");
                var mima1 = document.form1.pwd1.value;
                var mima2 = document.form1.pwd2.value;
                if (mima1!=mima2){
                    alert("两次输入的密码不一致!");
                }else{
                    form.submit();
                }
            }
        </script>

    </form>


</body>
</html>
